import { Deployments } from './deployments';
import { ChainId } from '@uniswap/sdk';

export type Configuration = {
  chainId: ChainId,
  etherscanUrl: string,
  defaultProvider: string[],
  deployments: Deployments,
  externalTokens: {[contractName: string]: [string, number, number?]};
  config?: EthereumConfig,
  spConfigs: {[key: string]: string},

  group: string,
  plane: {[planeName: string]: PlaneConfig},
  walletTokens: string[],
  boardroomRatioMin: number,
  mdexUrl: string,
  lavaUrl?: string,
  baseLaunchDate: Date,
  congressLaunchesAt?: Date,

  refreshInterval: number;
  gasLimitMultiplier: number;
};

export type PlaneConfig = {
  boardroomLaunchesAt: Date,
  bankStartAt?: Date,
  bankEndAt?: Date,
  blackHoleStartAt?: Date,
  blackHoleEndAt?: Date,
  oracle?: string,
  lpPair?: string,
  sCASH?: number,
  lp?: number,
  lpLabel?: string,
  lpOracle?: string,
  lpContract?: string,
  lp2?: boolean,
  destoryAddr?: string,
}

export type EthereumConfig = {
  testing: boolean,
  autoGasMultiplier: number,
  defaultConfirmations: number,
  defaultGas: string,
  defaultGasPrice: string,
  ethereumNodeTimeout: number,
};

export const defaultEthereumConfig = {
  testing: false,
  autoGasMultiplier: 1.5,
  defaultConfirmations: 1,
  defaultGas: "6000000",
  defaultGasPrice: "1000000000000",
  ethereumNodeTimeout: 10000,
};
